/**
 * 
 */
package org.vsg.stock.basic.service.business;

import java.util.Date;

import org.vsg.stock.core.domain.StockDailyKLine;
import org.vsg.stock.core.indicator.kline.ZigIndicatorResultItem;

/**
 * @author Bill Vison
 *
 */
public class CrestTroughTogetherTypeVO {

	
	private Date date;
	
	private short priceType;
	
	private double price;
	
	private ZigIndicatorResultItem.Type priceZigItemType;
	
	private ZigIndicatorResultItem.Type volZigItemType;
	
	private StockDailyKLine kline;
	
	
	public StockDailyKLine getKline() {
		return kline;
	}

	public void setKline(StockDailyKLine kline) {
		this.kline = kline;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public short getPriceType() {
		return priceType;
	}

	public void setPriceType(short priceType) {
		this.priceType = priceType;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public ZigIndicatorResultItem.Type getPriceZigItemType() {
		return priceZigItemType;
	}

	public void setPriceZigItemType(ZigIndicatorResultItem.Type priceZigItemType) {
		this.priceZigItemType = priceZigItemType;
	}

	public ZigIndicatorResultItem.Type getVolZigItemType() {
		return volZigItemType;
	}

	public void setVolZigItemType(ZigIndicatorResultItem.Type volZigItemType) {
		this.volZigItemType = volZigItemType;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((date == null) ? 0 : date.hashCode());
		long temp;
		temp = Double.doubleToLongBits(price);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + priceType;
		result = prime
				* result
				+ ((priceZigItemType == null) ? 0 : priceZigItemType.hashCode());
		result = prime * result
				+ ((volZigItemType == null) ? 0 : volZigItemType.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CrestTroughTogetherTypeVO other = (CrestTroughTogetherTypeVO) obj;
		if (date == null) {
			if (other.date != null)
				return false;
		} else if (!date.equals(other.date))
			return false;
		if (Double.doubleToLongBits(price) != Double
				.doubleToLongBits(other.price))
			return false;
		if (priceType != other.priceType)
			return false;
		if (priceZigItemType != other.priceZigItemType)
			return false;
		if (volZigItemType != other.volZigItemType)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "CrestTroughTogeterTypeVO [date=" + date + ", priceType="
				+ priceType + ", price=" + price + ", priceZigItemType="
				+ priceZigItemType + ", volZigItemType=" + volZigItemType + "]";
	}


	
	
}
